<!-- 用户未登录时显示 -->
<div [routerLink]="[ '/register' ]" class='noRegister' *ngIf="!register">请先登录！！</div>
<div class="hadRegister" *ngIf="register">
    <!-- 购物车商品内容 -->
    <div class="up">
        <!-- 全选栏 -->
        <div class='theAll'>
            <!-- 全选按钮 -->
            <div class='choose all' (click)="All()">
                <div class='chooseed' *ngIf="ifAll"></div>
            </div>
            <p class='allWord'>全选</p>
        </div>
        <!-- 购物车内商品 -->
        <ul class='cartList' *ngFor="let item of cartList">
            <!-- 每一个li都是一个商品 -->
            <li class='cartOne' *ngIf="!item.delete">
                <!-- 按钮 -->
                <div class='choose' (click)="choose(item.g_id)">
                    <div class='chooseed' *ngIf="item.static"></div>
                </div>
                <div class='imgdep'>
                    <!-- 图片 -->
                    <img [src]=item.g_img alt="商品图">
                    <!-- 直降 -->
                    <span class='depreciate'>直降</span>
                </div>
                <div class='nameNum'>
                    <div class='title'>{{item.g_title}}</div>
                    <!-- 价格 -->
                    <div class='price'>
                        <!-- 现价 -->
                        <p class='currentPrice'>￥{{item.g_price}}/t</p>
                        <!-- 加购数量 -->
                        <p class='num'>×{{item.goods_count}}</p>
                        <!-- 原价 -->
                        <div class='originalPrice'>
                            <div> 原价: <span class='f40'>￥{{item.g_price}}/t</span></div>
                        </div>
                    </div>
                </div>
                <!-- 删除商品 -->
                <img src="../../../assets/images/index/u156.png" alt="删除商品" class='delete' (click)="delete(item.g_id)">

            </li>
        </ul>
    </div>
    <!-- 删除确定弹出框 -->
    <div class='black' *ngIf="ask">
        <div class='Delete'>
            <p class='ifDelete'>确定要删除该商品</p>
            <div class='deleteYes' (click)="deleteYes()">确定</div>
            <div class='deleteNo' (click)="deleteNo()">取消</div>
        </div>
    </div>

    <!-- 结算栏 -->
    <p class="down" *ngIf="num">
        <span class='sumWord'>合计：</span>
        <span class='moneySum'>￥{{money}}</span>
        <span class='originalPrice'>原价:￥{{money}}</span>
        <span class='numSum'>（共{{num}}件）</span>
        <!-- 结算按钮 -->
    </p>
    <span class='input' *ngIf="num">结算（{{num}}）</span>
</div>
<app-foot></app-foot>
